Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toke.c: fix =cut detection #22760

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

mauke
Copy link
Contributor

@mauke mauke commented Nov 18, 2024

A line starting with =cut is only a cut directive if the next character is not a word character. Checking for isALPHA is insufficient because POD directives can contain digits (e.g. =head1, =head2).

Add the same check to the string eval case, where it was missing entirely.

Fixes #22759.


  • This set of changes requires a perldelta entry, and it is included.

toke.c Outdated Show resolved Hide resolved
toke.c Outdated Show resolved Hide resolved
A line starting with `=cut` is only a cut directive if the next
character is not a word character. Checking for isALPHA is insufficient
because POD directives can contain digits (e.g. `=head1`, `=head2`).

Add the same check to the string eval case, where it was missing
entirely.

Fixes Perl#22759.
@mauke mauke merged commit ed39ffd into Perl:blead Nov 19, 2024
33 checks passed
@mauke mauke deleted the fix-22759-pod-cut-parsing branch November 19, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

POD section unexpectedly stops at =cut2 (or =cute in string eval)
3 participants